package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.controller.request.PasswordRequest;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> list();

    List<User> listByCondition(BaseRequest baseRequest);

    void save(User user);

    void deleteById(Integer id);

    User getById(Integer id);


    User getByNo(String userNo);

    void updateById(User user);

    Integer deleteByIds(@Param("ids") List<Integer> ids);

    void updateByIsbn( @Param("score") int score,@Param("userId") Integer userId);

    User getByUsername(String username);


    void register(User user);

    int updatePassword(PasswordRequest request);
}
